//
//  Local+Language.swift
//  DIDA LED Banner
//
//  Created by macmini01 on 2024/11/13.
//

import Localize_Swift


extension Locale {
    
    static func defaultLanguage() -> String {
        return Localize.defaultLanguage()
    }
    static func currentLanguage() -> String {
        return Localize.currentLanguage()
    }
    static func availableLanguages() -> [String] {
        return Localize.availableLanguages(true)
    }
    
    static func setCurrentLanguage(_ language: String) {
        return Localize.setCurrentLanguage(language)
    }
    
    static func resetCurrentLanguageToDefault() {
        return Localize.resetCurrentLanguageToDefault()
    }
    
    static func isRTL() -> Bool {
        return Locale.currentLanguage() == "ar" || Locale.currentLanguage() == "fa_IR"
    }
}
